package com.pearadmin.system.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pearadmin.common.web.domain.request.PageDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pearadmin.system.mapper.ReportEvaluationResultsMapper;
import com.pearadmin.system.domain.ReportEvaluationResults;
import com.pearadmin.system.service.IReportEvaluationResultsService;

/**
 *  评价结果Service业务层处理
 * 
 * @author jmys
 * @date 2021-04-12
 */
@Service
public class ReportEvaluationResultsServiceImpl implements IReportEvaluationResultsService 
{
    @Autowired
    private ReportEvaluationResultsMapper reportEvaluationResultsMapper;

    /**
     * 查询 评价结果
     * 
     * @param id  评价结果ID
     * @return  评价结果
     */
    @Override
    public ReportEvaluationResults selectReportEvaluationResultsById(Long id)
    {
        return reportEvaluationResultsMapper.selectReportEvaluationResultsById(id);
    }

    /**
     * 查询 评价结果列表
     * 
     * @param reportEvaluationResults  评价结果
     * @return  评价结果
     */
    @Override
    public List<ReportEvaluationResults> selectReportEvaluationResultsList(ReportEvaluationResults reportEvaluationResults)
    {
        return reportEvaluationResultsMapper.selectReportEvaluationResultsList(reportEvaluationResults);
    }

    /**
     * 查询 评价结果
     * @param reportEvaluationResults  评价结果
     * @param pageDomain
     * @return  评价结果 分页集合
     * */
    @Override
    public PageInfo<ReportEvaluationResults> selectReportEvaluationResultsPage(ReportEvaluationResults reportEvaluationResults, PageDomain pageDomain)
    {
        PageHelper.startPage(pageDomain.getPage(),pageDomain.getLimit());
        List<ReportEvaluationResults> data = reportEvaluationResultsMapper.selectReportEvaluationResultsList(reportEvaluationResults);
        return new PageInfo<>(data);
    }

    /**
     * 新增 评价结果
     * 
     * @param reportEvaluationResults  评价结果
     * @return 结果
     */

    @Override
    public int insertReportEvaluationResults(ReportEvaluationResults reportEvaluationResults)
    {
        return reportEvaluationResultsMapper.insertReportEvaluationResults(reportEvaluationResults);
    }

    /**
     * 修改 评价结果
     * 
     * @param reportEvaluationResults  评价结果
     * @return 结果
     */
    @Override
    public int updateReportEvaluationResults(ReportEvaluationResults reportEvaluationResults)
    {
        return reportEvaluationResultsMapper.updateReportEvaluationResults(reportEvaluationResults);
    }

    /**
     * 删除 评价结果对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteReportEvaluationResultsByIds(String[] ids)
    {
        return reportEvaluationResultsMapper.deleteReportEvaluationResultsByIds(ids);
    }

    /**
     * 删除 评价结果信息
     * 
     * @param id  评价结果ID
     * @return 结果
     */
    @Override
    public int deleteReportEvaluationResultsById(Long id)
    {
        return reportEvaluationResultsMapper.deleteReportEvaluationResultsById(id);
    }
}
